package cn.code.auth.authorize.conn.app;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.social.connect.web.ProviderSignInUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.context.request.ServletWebRequest;

import javax.servlet.http.HttpServletRequest;

@RestController
public class DemoController {
    @Autowired
    private ProviderSignInUtils providerSignInUtils;
    @RequestMapping("/user/register")
    public void register(HttpServletRequest request){
        providerSignInUtils.doPostSignUp("wyd",new ServletWebRequest(request));
    }
}
